<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
.addstaff{
	display:none;
	}
#scrollDiv{position:fixed;left:50px;top:10px;}
* html #scrollDiv{top:expression(eval(document.body.scrollTop));}

#scrollDiv2{position:fixed;left:790px;top:10px; width:650px; background-color:#EEEEEE; padding:10px;}
* html #scrollDiv2{ width:650px; top:expression(eval(document.body.scrollTop)); background-color:#EEEEEE; padding:10px;}
.attn{
	background-color:#FF8080;	
}
textarea{
	background-color:#E87A75;
}

</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link type="text/css" href="/css/start/jquery-ui-1.8.21.custom.css" rel="Stylesheet" />	
<link type="text/css" href="/css/1pxtable.css" rel="Stylesheet" />	
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.21.custom.min.js"></script>

<title>Untitled Document</title>
<link rel="stylesheet" href="/js/chosen/chosen.css" />
</head>

<body style="font-family:Arial, Helvetica, sans-serif">
<h1>Check Offline Attendance</h1><br/>
<?php $jsFile = "roster_js_0603.js";?>
<h2>Payroll cycle (<?php echo $this->dateStart;?> - <?php echo $this->dateEnd;?>)</h2>
<form action="" method="post">
<hr width=100% size=1></hr>
<h2>Will Insert </h2>

<table width="1000" border="1" cellspacing="0" cellpadding="5">
  <tr>
    <td>No</td>
    <td>Shop</td>
    <td>Invoice</td>
    <td>Date</td>
    <td>Time</td>
    <td>Staff</td>
    <td>Remark</td>
    <td>On/Off</td>
    <td>ID</td>
  </tr>
  <?php foreach($this->arrInsert as $k => $v){?>
  <tr>
    <td><?php echo $k + 1;?></td>
    <td><?php echo $v['shop']?></td>
<td><?php echo $v['invoice_no']?></td>
<td><?php echo $v['date']?></td>
<td><?php echo $v['time']?></td>
<td><?php echo $v['staff']?></td>
<td><?php echo $v['remark']?></td>
<td><?php echo $v['on_off_duty']?></td>
<?php $stfId = (explode("-", $v['staff']));?>
<td><?php echo $stfId[0];?></td>
  </tr>
  <?php }?>
</table>
<br/>
<br/>
<p>&nbsp;</p>

<h2>Can Not Find </h2>
<a href="http://<?php echo WEB_IP;?>/roster/input/show/yes" target="_blank">Check ID</a><br/>

<table width="1000" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <td>No</td>
    <td>Shop</td>
    <td>Invoice</td>
    <td>Date</td>
    <td>Time</td>
    <td>Staff</td>
    <td>Remark</td>
    <td>On/Off</td>
    <td>ID</td>
    <td>OK</td>
  </tr>
  <?php foreach($this->arrCanNot as $k => $v){?>
  <tr>
    <td><?php echo $k + 1;?></td>
    <td><?php echo $v['shop']?><input name="shop[<?php echo $v['id'];?>]" type="hidden" value="<?php echo $v['shop']?>" /></td>
<td><?php echo $v['invoice_no']?><input name="ivo[<?php echo $v['id'];?>]" type="hidden" value="<?php echo $v['invoice_no']?>" /></td>
<td><?php echo $v['date']?><input name="date[<?php echo $v['id'];?>]" type="hidden" value="<?php echo $v['date']?>" /></td>
<td><?php echo $v['time']?><input name="time[<?php echo $v['id'];?>]" type="hidden" value="<?php echo $v['time']?>" /></td>
<td><?php echo $v['staff']?></td>
<td><?php echo $v['remark']?></td>
<td><?php echo $v['on_off_duty']?>
  <input name="on_off[<?php echo $v['id'];?>]" type="hidden" value="<?php echo $v['on_off_duty']?>" /></td>
<td>
<select name="id[<?php echo $v['id'];?>]" data-placeholder="Staff Name" class="chzn-select" style="width:200px" id="id[<?php echo $v['id'];?>]">
      <option value=""></option>
      <?php $stDetail = new Model_DbTable_Roster_Stafflogindetail();
		$stList = $stDetail->listStaffByNickName();
		$stInfo = new Model_DbTable_Roster_Staffinfo();?>
      <?php foreach($stList as $k2 => $v2) {
        $stShop = $stInfo->getStaffinfo($v2['id']);?>
      
      <option value="<?=$v2["id"]?>">
        <?=ucwords($v2["ni"])?>
        .
        <?=chr($v2["il"]+64)?> ( <?=ucwords(Model_EncryptHelper::getSslPassword($v2["n"]))?> )(<? echo $stShop['id_card']?>)
        </option>
      <?php } ?>
    </select>
</td>

<td><input type="checkbox" name="is_select[<?php echo $v['id'];?>]" id="is_select_<?php echo $v['id'];?>" /></td>
  </tr>
  <?php }?>
</table>
<br/>
<input name="submit" type="submit" value="Submit"></input>

</form>
<div id = "payrollWizard" <?php if(!$this->nextCheck){?>style = "visibility:hidden;<?php }?>">
<input type = "submit" name = "next" id = "next" value = "Next" style= "margin-left:800px;" onclick= "transfer('<?php echo $this->dateStart;?>','<?php echo $this->dateEnd;?>')"></input>
</div>
<p>&nbsp;</p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
  <script src="/js/chosen/chosen.jquery.js" type="text/javascript"></script>
  <script type="text/javascript"> 
    var config = {
      '.chzn-select': {allow_single_deselect:true},
    }
    for (var selector in config) {
      $(selector).chosen(config[selector]);
    }

    function transfer(date_begin,date_end){
    	window.location.href = 'http://<?php echo WEB_IP?>/rosteraudit/payroll-wizard-calculate-bonus/date_begin/'+ date_begin + '/date_end/' + date_end + '/next/yes';
        }
  </script>
</body>
</html>
